Document the ::output signal and add an example. (#507566, example by Owen
authorMatthias Clasen <mclasen@redhat.com>
Sun, 6 Jan 2008 06:35:49 +0000 (06:35 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Sun, 6 Jan 2008 06:35:49 +0000 (06:35 +0000)
2008-01-06  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkspinbutton.c: Document the ::output signal and
        add an example.  (#507566, example by Owen Taylor)

svn path=/trunk/; revision=19312

ChangeLog
gtk/gtkspinbutton.c

index 45f49670d323b448b837ba4014af4b7d1d930d7c..49fc0a9933ec39652f80f9b720068b48213a6e96 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-01-06  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkspinbutton.c: Document the ::output signal and
+       add an example.  (#507566, example by Owen Taylor)
+
 2008-01-06  Johan Dahlin  <johan@gnome.org>
 
        * gtk/gtkcellrenderercombo.c:
        * gtk/gtkiconfactory.c (render_fallback_image): Adjust to
        icon cache api change.  (#506135, Kazuki Iwamoto)
 
+2007-12-28  Mathias Hasselmann  <mathias@openismus.com>
+
+       Consider "wide-separators" and "separator-height" style properties:
+       The separator is drawn using gtk_paint_box instead of cairo, when
+       "wide-separators" is set. Also do not highlight details for previous
+       or next month, if their day matches the selected day. (#339540)
+
+       * gtk/gtkcalendar.c: Consider "wide-separators" and "separator-height"
+       in gtk_calendar_size_request and calendar_paint_day
+       * gtk/gtkstyle.c: Modify gtk_default_draw_box to use special colors
+       for selected detail separators in GtkCalendar.
+
 2007-12-28  Mathias Hasselmann  <mathias@openismus.com>
 
        Remove max_detail_height field from GtkCalendarPrivate. (#339540)
index 7aa6ebaa5274a5ba838e62c88f9c3ef0e2a2c33e..4831ba5d7ad7e1f4e21b75792a4afaf956a93b10 100644 (file)
@@ -290,6 +290,33 @@ gtk_spin_button_class_init (GtkSpinButtonClass *class)
                  G_TYPE_INT, 1,
                  G_TYPE_POINTER);
 
+  /**
+   * GtkSpinButton::output:
+   * @spin_button: the object which received the signal
+   * 
+   * The ::output signal can be used to change to formatting
+   * of the value that is displayed in the spin buttons entry.
+   * |[
+   * /&ast; show leading zeros &ast;/
+   * static gboolean
+   * on_output (GtkSpinButton *spin,
+   *            gpointer       data)
+   * {
+   *    GtkAdjustment *adj;
+   *    gchar *text;
+   *    
+   *    adj = gtk_spin_button_get_adjustment (spin);
+   *    value = (int)gtk_adjustment_get_value (adj);
+   *    text = g_strdup_printf ("%02d", value);
+   *    gtk_entry_set_text (GTK_ENTRY (spin), text);
+   *    g_free (text);
+   *    
+   *    return TRUE;
+   * }
+   * ]|
+   *
+   * Returns: %TRUE if the value has been displayed.
+   */
   spinbutton_signals[OUTPUT] =
     g_signal_new (I_("output"),
                  G_TYPE_FROM_CLASS (gobject_class),